{subtemplate common/header}
<div id="pt" class="wp">
	<a href="index.php" class="nvhm">$_G[setting][bbname]</a> &rsaquo; $_G[setting][navs][2][navname]
</div>

{ad/text/wp a_t}
<style id="diy_style" type="text/css"></style>
<div class="wp">
	<!--[diy=diy1]--><div id="diy1" class="area"></div><!--[/diy]-->
</div>

<div id="ct" class="wp cl{if !$_G['setting']['forumallowside']} w{/if}">

	<div class="mn{if !$_G['setting']['forumallowside']} mw{/if}">
		<div class="content">

		<div class="ch">
			<label class="wx"><a href="$_G[setting][navs][2][filename]">$_G[setting][navs][2][navname]</a></label>
			{hook/index_header}
		</div>

		<div class="bm cl mtn">
			<div class="ptn pbm bbda cl">
				<!--{if !$_G['setting']['forumallowside']}--><p class="y">{lang index_today}: <em>$todayposts</em>, {lang index_posts}: <em>$posts</em>, {lang index_members}: <em>$_G['cache']['userstats']['totalmembers']</em></p><!--{/if}-->
				<button type="button" id="postbtn" class="pn pnc z vm" onclick="showWindow('nav', 'forum.php?mod=misc&action=nav&special=0')" style="margin: -6px 10px 0 0;"><strong>{lang send_posts}</strong></button>
				<!--{if !$_G['uid']}-->
					<p>{lang home_welcome_guest}</p>
				<!--{elseif !empty($_G['setting']['search']['forum']['status'])}-->
					<p>{lang home_welcome} <strong>{$_G[member][username]}</strong>, <!--{if $lastvisit > 0}-->{lang home_lastvisit} {$lastvisit},<!--{/if}--> <a href="home.php?mod=space&uid=$_G['uid']&do=thread&view=me" title="{lang my_posts}" class="xi2">{lang my_posts}</a>, <a href="search.php?mod=forum&srchfrom=$newthreads&amp;searchsubmit=yes" title="{lang show_newthreads}" class="xi2">{lang show_newthreads}</a></p>
				<!--{/if}-->
			</div>
			<!--{if empty($gid) && $announcements}-->
				<div id="an">
					<dl class="mtm cl">
						<dt>{lang announcements}:</dt>
						<dd>
							<div id="anc"><ul id="ancl">$announcements</ul></div>
						</dd>
					</dl>
				</div>
				<script type="text/javascript">announcement();</script>
			<!--{/if}-->
		</div>

		{hook/index_top}
		<!--{loop $catlist $key $cat}-->
		<div class="fl{if $cat['forumcolumns']} flg{/if} cl">
			<div class="h cl">
				<!--{if $cat['moderators']}--><span class="d">{lang forum_category_modedby}: $cat[moderators]</span><!--{/if}-->
				<span class="o">
					<img id="category_$cat[fid]_img" src="{IMGDIR}/fl_$cat[collapseimg]" title="{lang spread}" alt="{lang spread}" onclick="toggle_collapse('category_$cat[fid]');" />
				</span>
				<h2><a href="forum.php?gid=$cat[fid]" style="{if $cat[extra][namecolor]}color: {$cat[extra][namecolor]};{/if}">$cat[name]</a></h2>
			</div>
			<div id="category_$cat[fid]" class="c cl" style="$collapse['category_'.$cat[fid]]">
				<!--{loop $cat[forums] $forumid}-->
				<!--{eval $forum=$forumlist[$forumid];}-->
				<!--{if !$cat['forumcolumns'] || $forum['orderid'] % $cat['forumcolumns'] == 0}-->
					<hr class="da" {if $forum['orderid'] == 0 }style="display: none;"{/if} />
				<!--{/if}-->
				<div id="forum$forum[fid]" class="flc cl"{if $cat['forumcolumns']} style="width: $cat[forumcolwidth]"{/if}>
					<div class="icn"{if !empty($forum[extra][iconwidth]) && !empty($forum[icon])} style="width: {$forum[extra][iconwidth]}px;"{/if}>
					<!--{if $forum[icon]}-->
						$forum[icon]
					<!--{else}-->
						<img src="{IMGDIR}/forum{if $forum[folder]}_new{/if}.gif" alt="" />
					<!--{/if}-->
					</div>
					<dl{if !empty($forum[extra][iconwidth]) && !empty($forum[icon])} style="margin-left: {echo $forum[extra][iconwidth] + 10}px;"{/if}>
						<dt><a href="forum.php?mod=forumdisplay&fid=$forum[fid]"{if $forum[redirect]} target="_blank"{/if}{if $forum[extra][namecolor]} style="color: {$forum[extra][namecolor]};"{/if}>$forum[name]</a><!--{if $forum[todayposts] && !$forum['redirect']}--><em> (<strong>$forum[todayposts]</strong>)</em><!--{/if}--></dt>
						<!--{if !$forum['redirect']}-->
						<dd class="i"><em>{lang forum_threads}: $forum[threads]</em><em>{lang forum_posts}: $forum[posts]</em></dd>
						<!--{/if}-->
						<!--{if $forum[description] && !$cat['forumcolumns']}--><dd class="xg2">$forum[description]</dd><!--{/if}-->
						<!--{if $forum['subforums'] && $cat['forumcolumns'] <= 1}--><dd class="sfl">{lang forum_subforums}: $forum['subforums']</dd><!--{/if}-->
						<dd>
						<!--{if $forum['permission'] == 1}-->
							{lang private_forum}
						<!--{else}-->
							<!--{if $forum['redirect']}-->
								<a href="forum.php?mod=forumdisplay&fid=$forum[fid]" class="xi2">{lang url_link}</a>
							<!--{elseif is_array($forum['lastpost'])}-->
								<!--{if $cat['forumcolumns'] < 3}-->
									<a href="forum.php?mod=redirect&tid=$forum[lastpost][tid]&amp;goto=lastpost#lastpost" class="xi2">{echo cutstr($forum[lastpost][subject], 30)}</a> $forum[lastpost][dateline] <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang anonymous}<!--{/if}-->
								<!--{else}-->
									<a href="forum.php?mod=redirect&tid=$forum[lastpost][tid]&amp;goto=lastpost#lastpost">{lang forum_lastpost}: $forum[lastpost][dateline]</a>
								<!--{/if}-->
							<!--{else}-->
								{lang never}
							<!--{/if}-->
						<!--{/if}-->
						</dd>
					</dl>
				</div>
				<!--{/loop}-->
			</div>
		</div>
		{ad/intercat/bm a_c/$cat[fid]}
		<!--{/loop}-->

		<!--{if !$_G['setting']['forumallowside']}-->
			<!--{if $_G['cache']['forumlinks'][0] || $_G['cache']['forumlinks'][1] || $_G['cache']['forumlinks'][2]}-->
			<div class="lk">
				<span class="o"><img id="category_lk_img" src="{IMGDIR}/collapsed_no.gif" title="{lang spread}" alt="{lang spread}" onclick="toggle_collapse('category_lk');" /></span>
				<h3>{lang board_links}</h3>
				<div id="category_lk" class="ptm mnlk">
					<!--{if $_G['cache']['forumlinks'][0]}-->
						<ul class="m mbn cl">$_G['cache']['forumlinks'][0]</ul>
					<!--{/if}-->
					<!--{if $_G['cache']['forumlinks'][1]}-->
						<div class="mbn cl">
							$_G['cache']['forumlinks'][1]
						</div>
					<!--{/if}-->
					<!--{if $_G['cache']['forumlinks'][2]}-->
						<ul class="x mbm cl">
							$_G['cache']['forumlinks'][2]
						</ul>
					<!--{/if}-->
				</div>
			</div>
			<!--{/if}-->
		<!--{/if}-->

		{hook/index_middle}

		<!--{if empty($gid) && $_G['setting']['whosonlinestatus']}-->
			<div id="online" class="bm oll">
			<!--{if $_G['setting']['whosonlinestatus']}-->
				<!--{if $detailstatus}-->
					<span class="o"><a href="forum.php?showoldetails=no#online" title="{lang pm_close}"><img src="{IMGDIR}/collapsed_no.gif" alt="{lang pm_close}" /></a></span>
					<h3>
						<strong><a href="home.php?mod=space&do=top&view=online">{lang onlinemember}</a></strong>
						<span class="xs1">- <strong>$onlinenum</strong> {lang onlines}
						- <strong>$membercount</strong> {lang index_members}(<strong>$invisiblecount</strong> {lang index_invisibles}),
						<strong>$guestcount</strong> {lang index_guests}
						- {lang index_mostonlines} <strong>$onlineinfo[0]</strong> {lang on} <strong>$onlineinfo[1]</strong>.</span>
					</h3>
				<!--{else}-->
					<span class="o"><a href="forum.php?showoldetails=yes#online" class="nobdr"><img src="{IMGDIR}/collapsed_yes.gif" alt="" /></a></span>
					<h3>
						<strong><a href="home.php?mod=space&do=top&view=online">{lang onlinemember}</a></strong>
						<span class="xs1">- {lang total} <strong>$onlinenum</strong> {lang onlines}
						- {lang index_mostonlines} <strong>$onlineinfo[0]</strong> {lang on} <strong>$onlineinfo[1]</strong>.</span>
					</h3>
				<!--{/if}-->
			<!--{else}-->
				<h3><strong><a href="forum.php?mod=member&action=online">{lang onlinemember}</a></strong></h3>
			<!--{/if}-->
			<!--{if $_G['setting']['whosonlinestatus'] && $detailstatus}-->
				<dl id="onlinelist">
				<dt>$_G[cache][onlinelist][legend]</dt>
				<!--{if $detailstatus}-->
					<dd>
					<ul class="cl">
					<!--{if $whosonline}-->
						<!--{loop $whosonline $key $online}-->
							<li title="{lang time}: $online[lastactivity]">
							<img src="{STATICURL}image/common/$online[icon]" alt="" />
							<!--{if $online['uid']}-->
								<a href="home.php?mod=space&uid=$online[uid]">$online[username]</a>
							<!--{else}-->
								$online[username]
							<!--{/if}-->
							</li>
						<!--{/loop}-->
					<!--{else}-->
						<li style="width: auto">{lang online_only_guests}</li>
					<!--{/if}-->
					</ul>
					</dd>
				<!--{/if}-->
				</dl>
			<!--{/if}-->
			</div>
		<!--{/if}-->

		{hook/index_bottom}
		</div>
	</div>

	<!--{if $_G['setting']['forumallowside']}-->
		<div id="sd" class="sd pph">
			{subtemplate common/userabout}
			<div class="tns">
				<table cellpadding="4" cellspacing="0" border="0">
					<tr>
						<th><p>$todayposts</p>{lang today_posts}</th>
						<th><p>$posts</p>{lang index_posts}</th>
						<td><p>$_G['cache']['userstats']['totalmembers']</p>{lang index_members}</td>
					</tr>
				</table>
			</div>
			{hook/index_side_top}
			<!--{if !empty($_G['cache']['heats']['message'])}-->
				<hr class="l" />
				<div class="bn">
					<h2>{lang hotthreads_forum}</h2>
					<!--{loop $_G['cache']['heats']['message'] $data}-->
						<dl class="xld bbs mbm">
							<dt><!--{if $_G['adminid'] == 1}--><a class="d" href="forum.php?mod=misc&action=removeindexheats&tid=$data[tid]&from=indexheats" onclick="return removeindexheats()">delete</a><!--{/if}-->
							<a href="forum.php?mod=viewthread&tid=$data[tid]&from=indexheats">$data[subject]</a></dt>
							<dd>$data[message]</dd>
						</dl>
					<!--{/loop}-->
					<ul class="xl">
						<!--{loop $_G['cache']['heats']['subject'] $data}-->
							<li><!--{if $_G['adminid'] == 1}--><a class="d" href="forum.php?mod=misc&action=removeindexheats&tid=$data[tid]" onclick="return removeindexheats()">delete</a><!--{/if}--><a href="forum.php?mod=viewthread&tid=$data[tid]&from=indexheats_second">$data[subject]</a></li>
						<!--{/loop}-->
					</ul>
				</div>
			<!--{/if}-->
			<hr class="l" />
			<div class="drag">
				<!--[diy=diy2]--><div id="diy2" class="area"></div><!--[/diy]-->
			</div>
			<!--{if $_G['cache']['forumlinks'][0] || $_G['cache']['forumlinks'][1] || $_G['cache']['forumlinks'][2]}-->
			<div class="bn lk">
				<h2>{lang board_links}</h2>
				<!--{if $_G['cache']['forumlinks'][0]}-->
					<ul class="m cl">$_G['cache']['forumlinks'][0]</ul>
				<!--{/if}-->
				<!--{if $_G['cache']['forumlinks'][1]}-->
					<div class="cl mbm">
						$_G['cache']['forumlinks'][1]
					</div>
				<!--{/if}-->
				<!--{if $_G['cache']['forumlinks'][2]}-->
					<ul class="x cl">
						$_G['cache']['forumlinks'][2]
					</ul>
				<!--{/if}-->
			</div>
			<!--{/if}-->
			{hook/index_side_bottom}
		<!--{/if}-->
	</div>
</div>

<div class="wp mtn">
	<!--[diy=diy3]--><div id="diy3" class="area"></div><!--[/diy]-->
</div>

{subtemplate common/footer}